from django.contrib import admin
from .models import UserAskModel, CourseCommentsModel, UserFavoriteModel, UserMessageModel, UserCourseModel


# Register your models here.


@admin.register(UserAskModel)
class UserAskAdmin(admin.ModelAdmin):
    list_display = ['id', 'name', 'mobilie', 'course_name', 'add_time']
    list_display_links = ['name']


@admin.register(CourseCommentsModel)
class CourseCommentsAdmin(admin.ModelAdmin):
    list_display = ['id', 'user', 'course', 'comments', 'add_time']
    list_display_links = ['comments']


@admin.register(UserFavoriteModel)
class UserFavoriteAdmin(admin.ModelAdmin):
    list_display = ['id', 'user', 'fav_id', 'fav_type', 'add_time']


@admin.register(UserMessageModel)
class UserMessageAdmin(admin.ModelAdmin):
    list_display = ['id', 'user', 'message', 'has_read', 'add_time']
    list_display_links = ['message']


@admin.register(UserCourseModel)
class UserCourseAdmin(admin.ModelAdmin):
    list_display = ['id', 'user', 'course', 'add_time']
    list_display_links = ['user']